<template>
    
    <!-- 组件的模板 -->
    <div class="main">
        <div class="tyccompanydetail" v-if="ajaxEnd">
            <div class="title">{{company_info.company_name}}</div>
            <div class="main_info">
                <div class="item" v-if='company_info.industry_name'>
                    <div class="key">公司行业</div>
                    <div class="val">{{company_info.industry_name}}</div>
                </div>
                <div class="item" v-if='company_info.company_addr'>
                    <div class="key">公司地址</div>
                    <div class="val">{{company_info.company_addr}}</div>
                </div>
                <div class="item" v-if='company_info.tiayancha_companyOryType'>
                    <div class="key">企业类型</div>
                    <div class="val">{{company_info.tiayancha_companyOryType}}</div>
                </div>
                <div class="item" v-if='company_info.tiayancha_regStatus'>
                    <div class="key">经营状态</div>
                    <div class="val">{{company_info.tiayancha_regStatus}}</div>
                </div>
                <div class="item" v-if='company_info.tiayancha_fromTime'>
                    <div class="key">成立时间</div>
                    <div class="val">{{company_info.tiayancha_fromTime}}</div>
                </div>
                <div class="item" v-if='company_info.tiayancha_toTime'>
                    <div class="key">经营期限</div>
                    <div class="val">{{company_info.tiayancha_toTime}}</div>
                </div>
                <div class="item" v-if='company_info.tiayancha_regCapital'>
                    <div class="key">注册资本</div>
                    <div class="val">{{company_info.tiayancha_regCapital}}</div>
                </div>
                <div class="item" v-if='company_info.tiayancha_regInstitute'>
                    <div class="key">登记机关</div>
                    <div class="val">{{company_info.tiayancha_regInstitute}}</div>
                </div>
                <div class="item" v-if='company_info.tiayancha_regLocation'>
                    <div class="key">注册地址</div>
                    <div class="val">{{company_info.tiayancha_regLocation}}</div>
                </div>
                <div class="item" v-if='company_info.tiayancha_creditCode'>
                    <div class="key">统一信用代码</div>
                    <div class="val">{{company_info.tiayancha_creditCode}}</div>
                </div>
                <div class="item" v-if='company_info.tiayancha_orgNumber'>
                    <div class="key">组织机构代码</div>
                    <div class="val">{{company_info.tiayancha_orgNumber}}</div>
                </div>
                <div class="item" v-if='company_info.tiayancha_businessScope'>
                    <div class="key">经营范围</div>
                    <div class="val">{{company_info.tiayancha_businessScope}}</div>
                </div>
                <div class="item" v-if='company_info.company_description'>
                    <div class="key">公司简介</div>
                    <div class="val">{{company_info.company_description}}</div>
                </div>
            </div>
            <div class="footer">
                <div class="text">提供</div>
                <div class="img"><img src="../../static/imgs/tianyancha.png" alt=""></div>
                <div class="text">以上部分信息由</div>
            </div>
        </div>
    </div>
</template>

<script>
    /**
     *  引入工具类库 或 Native API
     *  example : import widget from 'gapi/widget'
     */
    import * as util from 'js/util.js'
    import widget from 'gapi/widget'
    
    /**
     *  引入组件 以及 组件接口(Action)
     *  example : import Somecomponents from 'components/Somecomponents/Somecomponents'
     */

    /**
     *  组件实例对象
     */
    export default {
        components: {

        },
        data: function(){
            return{
                publisher_id: 0,
                company_info: {},
                ajaxEnd: false,
            }
        },
        vuex: {
            getters: {

            },
            actions: {

            }
        },
        methods: {
            /**
             * 初始化
             * @method init
             * @public
             * @return {Null} void
             */
            init (){
                this.publisher_id = util.getQueryString('publisher_id')
                // alert(this.publisher_id)
                util.ajax({
                    url:'/publisher/detail_tyc',
                    data: {
                        publisher_id: this.publisher_id
                    },
                    timeout:10000,
                    success:(data) => {
                        // alert(JSON.stringify(data))
                        if(data.code == 200){
                            this.ajaxEnd = true
                            this.company_info = data.data
                        }
                    },
                    error:() => {
                        commonPage.loadPageStatus('loadSuccess')
                        widget.toast('加载失败请重试')
                    }
                });
                
            }
        },
        created(){

            this.init();
            
        }
        
    }

    
</script>

<!-- CSS 样式 -->
<!-- <style src="static/css/global.css"></style> -->
<style src="../../static/css/base.css"></style>
<style src="../../static/css/yy_tyccompanydetail.css"></style>


